/*
*	The Actor class defines all functionality for individual Actors
* within the Encounter Manager program.
*
*	@Author nicholas.malacarne@gmail.com
*/
function Actor( aId, aMod ){

	// argument type check -nm
	if ( typeof aId != "string" || typeof aMod != "number" ){ throw "Actor(string, int) : invalid argument data!"; }
	
	// min/max roll for the actor -nm
	const MIN_ROLL	= 1;
	const MAX_ROLL	= 20;
	
	// id of the actor -nm
	var id		= aId;
	
	// initiative mod of the actor -nm
	var mod		= aMod;
	
	// initiative roll of the actor (defaults to minimum) -nm
	var roll	= Math.floor( Math.random() * ( MAX_ROLL - MIN_ROLL + 1 ) ) + MIN_ROLL;
	
	// getters -nm
	this.getId 		= function(){ return id; } // end method
	this.getMod		= function(){ return mod; } // end method
	this.getRoll	= function(){ return roll; } // end method
	this.getTotal	= function(){ return mod + roll; } // end method
}
